import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { NzMessageService } from 'ng-zorro-antd';
import { CompanyService } from '../../../core/routes-services/company.service';
import { Step1Component } from '../step/step1.component';
import { Step2Component } from '../step/step2.component';
import { Step3Component } from '../step/step3.component';
import { Step1points1Component } from '../step/step1points1.component';

@Component({
  selector: 'app-company-add',
  templateUrl: './company-add.component.html',
  styles: [],
})
export class CompanyAddComponent implements OnInit {

  id: any = 0;// 默认表示新增
  entity: any = {};
  isLoading: boolean = false;

  @ViewChild('step0') step0: Step1Component;
  @ViewChild('step1_1') step1_1: Step1points1Component;
  @ViewChild('step1') step1: Step2Component;
  @ViewChild('step2') step2: Step3Component;

  title: any;

  constructor(
    private router: Router,
    private route: ActivatedRoute,
    public companyService: CompanyService,
    public message: NzMessageService,
  ) {
  }



  ngOnInit() {
    this.companyService.reset();
    this.companyService.entity = this.entity;
    this.title = this.entity.title;
  }

  indexChange(index) {
    this.companyService.step = index;
  }

}
